home *** CD-ROM | disk | FTP | other *** search
/ Tricks of the Mac Game Programming Gurus / TricksOfTheMacGameProgrammingGurus.iso / More Source / C⁄C++ / Tetris Light 1.0 / source / game.h < prev    next >
Text File  |  1993-08-05  |  2KB  |  72 lines

  1. /**********************************************************************\
  2.  
  3. File:        game.h
  4.  
  5. Purpose:    This is the screen interface module for the Tetris program.
  6.             
  7.  
  8. ``Tetris Light'' - a simple implementation of a Tetris game.
  9. Copyright (C) 1993 Hoylen Sue
  10.  
  11. This program is free software; you can redistribute it and/or modify
  12. it under the terms of the GNU General Public License as published by
  13. the Free Software Foundation; either version 2 of the License, or
  14. (at your option) any later version.
  15.  
  16. This program is distributed in the hope that it will be useful,
  17. but WITHOUT ANY WARRANTY; without even the implied warranty of
  18. MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE.  See the
  19. GNU General Public License for more details.
  20.  
  21. You should have received a copy of the GNU General Public License
  22. along with this program; see the file COPYING.  If not, write to the
  23. Free Software Foundation, 675 Mass Ave, Cambridge, MA 02139, USA.
  24.  
  25. \**********************************************************************/
  26.  
  27. #ifndef game_H
  28. #define game_H
  29.  
  30. /*--------------------------------------------------------------------*/
  31.  
  32. extern Boolean game_init(void);
  33. extern void game_begin(void);
  34. extern void game_term(void);
  35.  
  36. /*--------------------------------------------------------------------*/
  37.  
  38. /* Support routines for the tetris module */
  39.  
  40. extern void game_del_row(int victim);
  41. extern void game_set(int x, int y, unsigned char pattern);
  42. extern unsigned char game_get(int x, int y);
  43.  
  44. extern void game_score_changed(void);
  45. extern void game_over(void);
  46.  
  47. extern void describe_next_begin(void);
  48. extern void describe_next_cell(int x, int y, unsigned char pattern);
  49. extern void describe_next_end(void);
  50.  
  51. /*--------------------------------------------------------------------*/
  52.  
  53. /* Routines for higher level modules to call */
  54.  
  55. extern void game_periodic(void);
  56.  
  57. extern void game_new(void);
  58. extern void game_save_as(void);
  59. extern void game_save(void);
  60. extern void game_open(void);
  61. extern void game_load(Str255 fname, INTEGER vref);
  62.  
  63. extern OSErr game_save_location(INTEGER pref_file);
  64. extern void game_load_location(void);
  65.  
  66. extern Boolean game_is_over(void);
  67.  
  68. /*--------------------------------------------------------------------*/
  69.  
  70. #endif
  71.  
  72.